package com.yict.csms.system.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.LinkedHashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.yict.csms.company.entity.ContractRate;

@Entity
@Table(name = "CSMS_PROFESSION")
public class Profession implements Serializable {

	@Id
	@Column(name = "PROFEID")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "csms_profession_seq")
	@SequenceGenerator(name = "csms_profession_seq", sequenceName = "SEQ_CSMS_PROFESSION", allocationSize = 1, initialValue = 1)
	private Long profeid;

	@Column(name = "PROFECODE")
	private String profecode;
	
	@Column(name = "PROFENAME")
	private String profename;

	@Column(name = "PROFETYPE")
	private String profetype;

	@Column(name = "ACCOUNTMETHOD")
	private String accountmethod;

	@Column(name = "COMMITSTUTAS")
	private String commitstutas;

	@Column(name = "CREATEPERSON")
	private Long createperson;

	@Column(name = "CREATEDATE")
	private Date createdate;

	@Column(name = "UPDATEPERSON")
	private Long updateperson;

	@Column(name = "UPDATEDATE")
	private Date updatedate;
	
	@OneToMany(fetch=FetchType.LAZY)
	@JoinColumn(name = "PROFEID")
	private Set<Station> stationSet = new LinkedHashSet<Station>();
	
	@OneToMany(fetch=FetchType.LAZY)
	@JoinColumn(name = "PROFEID")
	private Set<ContractRate> contractRateSet = new LinkedHashSet<ContractRate>();
	
	@OneToMany(fetch=FetchType.LAZY)
	@JoinColumn(name = "ORDER_PROFEID")
	private Set<CostProfession> costProfessionOrder = new LinkedHashSet<CostProfession>();
	
	@OneToMany(fetch=FetchType.LAZY)
	@JoinColumn(name = "COST_PROFEID")
	private Set<CostProfession> costProfessionCost = new LinkedHashSet<CostProfession>();
	
	public Long getProfeid() {
		return profeid;
	}
	public void setProfeid(Long profeid) {
		this.profeid = profeid;
	}
	public String getProfecode() {
		return profecode;
	}
	public void setProfecode(String profecode) {
		this.profecode = profecode;
	}
	public String getProfename() {
		return profename;
	}
	public void setProfename(String profename) {
		this.profename = profename;
	}
	public String getProfetype() {
		return profetype;
	}
	public void setProfetype(String profetype) {
		this.profetype = profetype;
	}
	public String getAccountmethod() {
		return accountmethod;
	}
	public void setAccountmethod(String accountmethod) {
		this.accountmethod = accountmethod;
	}
	public String getCommitstutas() {
		return commitstutas;
	}
	public void setCommitstutas(String commitstutas) {
		this.commitstutas = commitstutas;
	}
	public Long getCreateperson() {
		return createperson;
	}
	public void setCreateperson(Long createperson) {
		this.createperson = createperson;
	}
	public Date getCreatedate() {
		return createdate;
	}
	public void setCreatedate(Date createdate) {
		this.createdate = createdate;
	}
	public Long getUpdateperson() {
		return updateperson;
	}
	public void setUpdateperson(Long updateperson) {
		this.updateperson = updateperson;
	}
	public Date getUpdatedate() {
		return updatedate;
	}
	public void setUpdatedate(Date updatedate) {
		this.updatedate = updatedate;
	}
	public Set<Station> getStationSet() {
		return stationSet;
	}
	public void setStationSet(Set<Station> stationSet) {
		this.stationSet = stationSet;
	}
	public Set<ContractRate> getContractRateSet() {
		return contractRateSet;
	}
	public void setContractRateSet(Set<ContractRate> contractRateSet) {
		this.contractRateSet = contractRateSet;
	}
	public Set<CostProfession> getCostProfessionOrder() {
		return costProfessionOrder;
	}
	public void setCostProfessionOrder(Set<CostProfession> costProfessionOrder) {
		this.costProfessionOrder = costProfessionOrder;
	}
	public Set<CostProfession> getCostProfessionCost() {
		return costProfessionCost;
	}
	public void setCostProfessionCost(Set<CostProfession> costProfessionCost) {
		this.costProfessionCost = costProfessionCost;
	}
}
